home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / var / lib / dpkg / info / dash.prerm < prev    next >
Encoding:
Text File  |  2010-12-14  |  563 b   |  32 lines

  1. #!/bin/sh
  2. #
  3. # pre-removal script for the Debian GNU/Linux ash package
  4. #
  5. # $Id: dash.prerm,v 1.2 2003/09/03 10:42:08 herbert Exp $
  6.  
  7. set -e
  8.  
  9. remove_divert() {
  10.     diverter=$(dpkg-divert --listpackage $1)
  11.     if [ "$diverter" = "dash" ]; then
  12.         dpkg-divert --package dash --rename --remove $1
  13.     fi
  14. }
  15.  
  16. remove_shell() {
  17.     if ! type remove-shell > /dev/null 2>&1; then
  18.         return
  19.     fi
  20.  
  21.     remove-shell /bin/dash
  22. }
  23.  
  24. if [ "$1" = remove ] || [ "$1" = deconfigure ]; then
  25.     remove_divert /bin/sh
  26.     remove_divert /usr/share/man/man1/sh.1.gz
  27. fi
  28.  
  29. if [ "$1" = remove ]; then
  30.     remove_shell
  31. fi
  32.